variable "libvirt_uri" {
  type    = string
  default = "qemu:///system"
}

variable "ssh_private_key" {
  description = "The private key for ssh access"
  type        = string
  default     = "~/.ssh/id_rsa"
}

variable "ssh_public_keys" {
  description = "List of public ssh keys"
  type        = list(string)
  default     = []
}

variable "ssh_user" {
  description = "User of ssh access"
  type        = string
  default     = "ubuntu"
}

variable "local_admin" {
  description = "Admin user without ssh access"
  type        = string
  default     = ""
}

variable "local_admin_passwd" {
  description = "Local admin user password created by $(mkpasswd --method=SHA-512 --rounds=4096)"
  type        = string
  default     = ""
}

variable "time_zone" {
  description = "Time Zone"
  type        = string
  default     = "UTC"
}

variable "vm_pool" {
  description = "The storage pool for virtual machines"
  type        = string
  default     = "default"
}

variable "data_pool" {
  description = "The storage pool for data volumes"
  type        = string
  default     = "default"
}

variable "ci_pool" {
  description = "The pool for cloudinit iso"
  type        = string
  default     = "boot"
}

variable "base_pool" {
  description = "The storage pool where the base image store"
  type        = string
  default     = "cloudimages"
}

variable "base_img" {
  description = "The base image name"
  type        = string
  default     = "jammy-server-cloudimg-amd64-disk-kvm.img"
}

variable "osdisk_size" {
  description = "The size for OS disk (GB)"
  type        = number
  default     = 30
}

variable "datadisk_size" {
  description = "The size for data disk mounted to work nodes (GB)"
  type        = number
  default     = 100
}

variable "cluster_name" {
  description = "Cluster name, used for node hostname prefix"
  type        = string
  default     = "labk8s"
}

variable "cp_node_count" {
  description = "The number of control plane nodes"
  type        = number
  default     = 3
}

variable "work_node_count" {
  description = "The number of work nodes"
  type        = number
  default     = 3
}

variable "cp_vcpu" {
  description = "The number of vCPUs for control plane node"
  type        = number
  default     = 2
}

variable "work_vcpu" {
  description = "The number of vCPUs for work node"
  type        = number
  default     = 4
}

variable "cp_memory" {
  description = "The RAM size for control plane node (MB)"
  type        = string
  default     = "2048"
}

variable "work_memory" {
  description = "The RAM size for work node (MB)"
  type        = string
  default     = "8192"
}

variable "network_bridge" {
  description = "Bridge interface the network connect to"
  type        = string
  default     = "virbr0"
}

variable "network_gateway" {
  description = "IP address of network gateway"
  type        = string
  default     = "192.168.122.1"
}

variable "network_netmask" {
  description = "Network netmask"
  type        = string
  default     = "24"
}

variable "cp_ipv4_addresses" {
  description = "The ipv4 addresses for control plane nodes"
  type        = list(string)
  default     = []
}

variable "work_ipv4_addresses" {
  description = "The ipv4 addresses for work nodes"
  type        = list(string)
  default     = []
}

variable "nameserver" {
  description = "The ip address of main nameserver"
  type        = string
  default     = "192.168.31.1"
}
